package com.ktwlsoft.archivemanage.domain.business.repositoryService.customAnalysis;

import java.util.List;

import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ktwlsoft.archivemanage.domain.dao.repository.customAnalysis.IAnalysisDimensionMapper;
import com.ktwlsoft.archivemanage.domain.dao.entity.customAnalysis.AnalysisDimension;

/**
 * analysis_dimension--维度业务层接口实现类
 *
 * @author zhuhe on 2019-11-27 15:32:02
 * @version 1.0
 */
@Service("IAnalysisDimensionService")
public class AnalysisDimensionRepositoryService {
	
	private final IAnalysisDimensionMapper analysisDimensionMapper;

	public AnalysisDimensionRepositoryService(IAnalysisDimensionMapper analysisDimensionMapper) {
		this.analysisDimensionMapper = analysisDimensionMapper;
	}

	/**
 	 * 查询分页 on 2019-11-27 15:32:02
 	 * @param pn 第几页
     * @param pageSize 每页多少条
 	 * @param analysisDimension analysisDimension
 	 * @return PageInfo<AnalysisDimension>
 	 */
	public PageInfo<AnalysisDimension> findPage(int pn,int pageSize,AnalysisDimension analysisDimension) {
		PageHelper.startPage(pn,pageSize);
		PageInfo<AnalysisDimension> pageInfo = new PageInfo<AnalysisDimension>(analysisDimensionMapper.findList(analysisDimension));
		return pageInfo;
	}

    /**
	 * 查询集合 on 2019-11-27 15:32:02
	 * @param analysisDimension analysisDimension
	 * @return List<AnalysisDimension>
	 */
	public List<AnalysisDimension> findList(AnalysisDimension analysisDimension) {
		return analysisDimensionMapper.findList(analysisDimension);
	}

    /**
	 * 根据ID查询信息 on 2019-11-27 15:32:02
	 * @param id	主键
	 * @return AnalysisDimension
	 */
	public AnalysisDimension getById(Long id){
		return analysisDimensionMapper.getById(id);
	}

	/**
	  * 根据分析id查询数据 on 2019/11/28 9:32
	  *
	  * @param analysisId analysisId
	  * @return List<AnalysisDimension>
	  */
	public List<AnalysisDimension> getByAnalysisId(Long analysisId){
		return analysisDimensionMapper.getByAnalysisId(analysisId);
	}

   /**
	 * 新增 on 2019-11-27 15:32:02
	 * @param analysisDimension analysisDimension
	 * @return int
	 */
	public int insert(AnalysisDimension analysisDimension){
		return analysisDimensionMapper.insert(analysisDimension);
	}

	/**
	 * 批量新增 on 2019-11-27 15:32:02
	 * @param list list
	 * @return int
	 */
	public int manyInsert(List<AnalysisDimension> list){
		return analysisDimensionMapper.manyInsert(list);
	}

   /**
	 * 修改 on 2019-11-27 15:32:02
	 * @param analysisDimension analysisDimension
	 * @return int
	 */
	public int update(AnalysisDimension analysisDimension){
		return analysisDimensionMapper.update(analysisDimension);
	}

   /**
	 * 根据id集合批量删除信息 on 2019-11-27 15:32:02
	 * @param analysisDimensionArr	主键编号集合
	 * @return int
	 */
	public int deleteByIds(List<Long> analysisDimensionArr){
		return analysisDimensionMapper.deleteByIds(analysisDimensionArr);
	}

   /**
	 * 根据id删除信息 on 2019-11-27 15:32:02
	 * @param id id
	 * @return int
	 */
	public int deleteById(Long id){
		return analysisDimensionMapper.deleteById(id);
	}

	/**
	 * 根据自助分析id删除信息 on 2019-11-27 15:32:02
	 * @param analysisId analysisId
	 * @return int
	 */
	public int deleteByAnalysisId(Long analysisId){
		return analysisDimensionMapper.deleteByAnalysisId(analysisId);
	}
}
